package com.javabase.study.OOPFistPart;

/**
 * TODO
 * 内容：关键字 instanceof学习
 * 二元运算符  左边是对象 右面是类，如果左侧对象是右边类 或者子类所创建的对象时，返回true 否则返回false
 * 作者:jxx
 * 创建时间：2021/6/15
 */
public class TestInsanceof {
    public static void main(String[] args){

        Student student = new Student("jiangxx",172,"java");
        Person p = new Person();
        System.out.println(student instanceof Student);
        System.out.println(student instanceof  Person);
        System.out.println(p instanceof Student);
    }
}
